Auto merge of #2988 - lifthrasiir:doc-open-with-target, r=alexcrichton
authorbors <bors@rust-lang.org>
Sun, 14 Aug 2016 07:07:46 +0000 (00:07 -0700)
committerGitHub <noreply@github.com>
Sun, 14 Aug 2016 07:07:46 +0000 (00:07 -0700)
commita6e47cafa63af0b68178b809d970744f82cb44cb
tree9d19bb4af9c2abf3ab074ef8fdc7e965cccc2175
parentc205132c6ff66babd0eb741e08363f1d79d77eba
parent60afff01d4b37e2177b7a862e763e4ca4b4c2d64
Auto merge of #2988 - lifthrasiir:doc-open-with-target, r=alexcrichton

Make `cargo doc --open --target TARGET` work as expected.

Currently `cargo doc --open` opens `$TARGET/doc` unconditionally, but it is incorrect if the explicit target is specified.

The target directory should be same to what `Layout::new()` generates, and ideally it should use the same data source (it hadn't been so far), but I'm yet to find a good way to signal that. At least I'm pretty sure that `Compilation` is not a good position to put them (it assumes the bipartite "root"-"deps" separation which doesn't quite work in documentation).